perm filename SPHERE.CH[UHF,DEK] blob sn#830298 filedate 1986-12-23 generic text, type T, neo UTF8
% Change file for DDTONE.WEB, computes a "sphere"
@x
reset(bytes_in,input_name,'/B:8')
@y
@z
@x
@!t:eight_bits; {byte of input}
begin new_row[0]←0.0;
if i>mm then for j←1 to nn do new_row[j]←0.0
else for j←1 to nn do
	begin read(bytes_in,t); new_row[j]←(255.5-t)/256.0;
@y
@!x,@!y,@!z:real; {coordinates of input}
begin new_row[0]←0.0;
if i>mm then for j←1 to nn do new_row[j]←0.0
else for j←1 to nn do
	begin x←(i-120)/111.5; y←(j-120)/111.5; z←1.0-x*x-y*y;
	if z<0.0 then new_row[j]←(1250*i+j*j)/1000000
	else new_row[j]←(9+x-4*y-8*sqrt(z))/18.0;
@z